package com.yunhe.authority.domain.wechat;

/**
 * @author zhengbo
 * @date 2021/3/1 14:08
 * 登录凭证校验返回的object
 */
public class Code2Session {

    /**用户唯一标识*/
    private String openid;

    /**会话密钥*/
    private String session_key;

    /**用户在开放平台的唯一标识符，在满足 UnionID 下发条件的情况下会返回，详见 UnionID 机制说明。*/
    private String unionid;

    /**
     * 错误码
     * -1	    系统繁忙，此时请开发者稍候再试
     * 0	    请求成功
     * 40029	code 无效
     * 45011	频率限制，每个用户每分钟100次
     */
    private String errcode;

    /**错误信息*/
    private String errmsg;

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getSession_key() {
        return session_key;
    }

    public void setSession_key(String session_key) {
        this.session_key = session_key;
    }

    public String getUnionid() {
        return unionid;
    }

    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }

    public String getErrcode() {
        return errcode;
    }

    public void setErrcode(String errcode) {
        this.errcode = errcode;
    }

    public String getErrmsg() {
        return errmsg;
    }

    public void setErrmsg(String errmsg) {
        this.errmsg = errmsg;
    }

    @Override
    public String toString() {
        return "Code2Session{" +
                "openid='" + openid + '\'' +
                ", session_key='" + session_key + '\'' +
                ", unionid='" + unionid + '\'' +
                ", errcode='" + errcode + '\'' +
                ", errmsg='" + errmsg + '\'' +
                '}';
    }
}
